using System;

namespace MFGps.Devices
{
    public class MediaTek : NmeaGps
    {
        public MediaTek()
        {
            // This is the default baud rate for my Locosys MediaTek GPS units - MarkH.
            // Oddly enough, the default on mine out of the box was 57600 - GregO
            // Hardware specs for the Locosys GPS modules: http://www.sparkfun.com/datasheets/GPS/Modules/LS20030%7E3_datasheet_v1.0.pdf
            BaudRate = 9600;
        }

        /// <summary>
        /// Create a new MediaTek GPS device
        /// </summary>
        /// <param name="comPort">Specify the com port that should be used.</param>
        public MediaTek(string comPort, int baudRate)
        {
            ComPort = comPort;
            BaudRate = baudRate;
        }

        /// <summary>
        /// Create a new MediaTek GPS device
        /// </summary>
        /// <param name="ComPort">Specify the com port that should be used.</param>
        /// <param name="EnableEventUpdate">If true, instructs the device to raise the PositionChanged event when an updated location becomes avaliable</param>
        public MediaTek(string comPort, int baudRate, bool enableEventUpdate)
        {
            ComPort = comPort;
            BaudRate = baudRate;
            PositionUpdateEnabled = enableEventUpdate;
        }

        /// <summary>
        /// Create a new MediaTek GPS device
        /// </summary>
        /// <param name="ComPort">Specify the com port that should be used.</param>
        /// <param name="EnableEventUpdate">If true, instructs the device to raise the PositionChanged event when an updated location becomes avaliable</param>
        /// <param name="initilizeTime">DateTime to initilize the GPS device with. This allows for faster Position lock</param>
        public MediaTek(string comPort, int baudRate, bool enableEventUpdate, DateTime initilizeTime)
        {
            ComPort = comPort;
            BaudRate = baudRate;
            PositionUpdateEnabled = enableEventUpdate;
            LocalTime = initilizeTime;
        }

        /// <summary>
        /// Change the baud rate that the GPS device will communicate at, and then reconnect.
        /// </summary>
        /// <param name="newBaud">New baud rate</param>
        public override void ChangeBaudRate(int newBaud)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        ///  Change the speed the device will send position updates at
        /// </summary>
        /// <param name="newRate">New rate, in Hz</param>
        public override void ChangeUpdateRate(int newRate)
        {
            throw new NotImplementedException();
        }

        internal override void CollectRangeErrorStatisticsChanged()
        {
            throw new NotImplementedException();
        }

        internal override void DeadReckoningValueChanged()
        {
            throw new NotImplementedException();
        }
    }
}
